package com.campus.campusdelivery.dto;

import com.campus.campusdelivery.constant.OrderStatus;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

@Data
public class OrderDto {
    private Long id;
    private String orderNumber;
    private Long userId;
    private String userName;
    private Long merchantId;
    private String merchantName;
    private Long deliveryPersonId;
    private String deliveryPersonName;
    private OrderStatus status;
    private BigDecimal totalAmount;
    private String deliveryAddress;
    private String contactPhone;
    private String remark;
    private LocalDateTime orderTime;
    private LocalDateTime confirmTime;
    private LocalDateTime prepareTime;
    private LocalDateTime readyTime;
    private LocalDateTime deliveryTime;
    private LocalDateTime completeTime;
    private LocalDateTime cancelTime;
    private String cancelReason;
    private List<OrderItemDto> orderItems;
    
    @Data
    public static class OrderItemDto {
        private Long id;
        private Long menuItemId;
        private String menuItemName;
        private String menuItemImage;
        private BigDecimal price;
        private Integer quantity;
        private BigDecimal subtotal;
    }
}
